mixin treeShow()
    block script
        script(type='text/javascript' src=__PLUGINS_PATH__ +'/ztree/jquery.ztree.all.min.js')
        script(type='text/javascript' src= __JS_PATH__ + '/setting.js')
        script(type='text/javascript').
            var zTree;
            var setting = {
                view: {
                    dblClickExpand: false,
                    showLine: true,
                    selectedMulti: false
                },
                data: {
                    key:{
                        name:"label"
                    },
                    simpleData: {
                        enable: true,
                        name: "label",
                        title: "label",
                        idKey: "id",
                        pIdKey: "parentId",
                        rootPId: ""
                    }
                },
                callback: {
                    beforeDblClick: beforeMouseDoubleClick,
                    onClick: beforeMouseDown
                }
            };

            var zNodes = JSON.parse($('#tree').attr('data-node'));
            zNodes[0].open = true;


            function beforeMouseDown(e,treeId, treeNode) {
                $('#tree').attr('data-cur-id',treeNode.id).attr('data-cur-pid',treeNode.parentId);
            }

            function beforeMouseDoubleClick(treeId, treeNode) {
                var zTree = $.fn.zTree.getZTreeObj("tree");
                if (treeNode.isParent) {
                    zTree.expandNode(treeNode);
                    return false;
                } else {
                    return true;
                }
            }
            $(document).ready(function () {
                var t = $("#tree");
                t = $.fn.zTree.init(t, setting, zNodes);
            });


